package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.EquipmentPurchaseMapper;
import com.ruoyi.system.domain.EquipmentPurchase;
import com.ruoyi.system.service.IEquipmentPurchaseService;

/**
 * 设备购买Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-08
 */
@Service
public class EquipmentPurchaseServiceImpl implements IEquipmentPurchaseService 
{
    @Autowired
    private EquipmentPurchaseMapper equipmentPurchaseMapper;

    /**
     * 查询设备购买
     * 
     * @param purchaseId 设备购买主键
     * @return 设备购买
     */
    @Override
    public EquipmentPurchase selectEquipmentPurchaseByPurchaseId(Long purchaseId)
    {
        return equipmentPurchaseMapper.selectEquipmentPurchaseByPurchaseId(purchaseId);
    }

    /**
     * 查询设备购买列表
     * 
     * @param equipmentPurchase 设备购买
     * @return 设备购买
     */
    @Override
    public List<EquipmentPurchase> selectEquipmentPurchaseList(EquipmentPurchase equipmentPurchase)
    {
        return equipmentPurchaseMapper.selectEquipmentPurchaseList(equipmentPurchase);
    }

    /**
     * 新增设备购买
     * 
     * @param equipmentPurchase 设备购买
     * @return 结果
     */
    @Override
    public int insertEquipmentPurchase(EquipmentPurchase equipmentPurchase)
    {
        return equipmentPurchaseMapper.insertEquipmentPurchase(equipmentPurchase);
    }

    /**
     * 修改设备购买
     * 
     * @param equipmentPurchase 设备购买
     * @return 结果
     */
    @Override
    public int updateEquipmentPurchase(EquipmentPurchase equipmentPurchase)
    {
        return equipmentPurchaseMapper.updateEquipmentPurchase(equipmentPurchase);
    }

    /**
     * 批量删除设备购买
     * 
     * @param purchaseIds 需要删除的设备购买主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentPurchaseByPurchaseIds(Long[] purchaseIds)
    {
        return equipmentPurchaseMapper.deleteEquipmentPurchaseByPurchaseIds(purchaseIds);
    }

    /**
     * 删除设备购买信息
     * 
     * @param purchaseId 设备购买主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentPurchaseByPurchaseId(Long purchaseId)
    {
        return equipmentPurchaseMapper.deleteEquipmentPurchaseByPurchaseId(purchaseId);
    }
}
